Skip to content

8/8 Add bounded forward filling for satellite indices - #45

Open
Timothy-W-Hilton wants to merge 1 commit into
tglauch:mainfrom
Timothy-W-Hilton:add-satellite-index-forward-fill
Open

8/8 Add bounded forward filling for satellite indices#45
Timothy-W-Hilton wants to merge 1 commit into
tglauch:mainfrom
Timothy-W-Hilton:add-satellite-index-forward-fill

Conversation

@Timothy-W-Hilton

Copy link
Copy Markdown

Add bounded forward filling for satellite indices

Summary

Add an optional preprocessor method for per-pixel forward filling of satellite indices such as EVI and LSWI across satellite images. It is intended for applications that choose a bounded use-most-recent-valid-observation policy for cloud-obscured or otherwise missing observations.

Behavior

vprm_preprocessor.forward_fill_satellite_indices():

  • operates along the merged satellite-image time dimension;
  • fills each pixel independently, so an observation is never borrowed from a neighboring pixel;
  • fills EVI and LSWI by default, or a caller-selected sequence of index variables;
  • accepts an optional max_age_days limit;
  • preserves leading gaps and gaps whose most recent valid observation exceeds that age limit as NaN.

The method must be called after sort_and_merge_by_timestamp(), which stores image time as elapsed days from the first image, and before calculations that derive VPRM statistics from the satellite indices.

Example

vprm_pre.sort_and_merge_by_timestamp()
vprm_pre.forward_fill_satellite_indices(
    keys=("evi", "lswi"),
    max_age_days=72,
)
vprm_pre.calc_min_max_evi_lswi()

Calling the method is optional: existing workflows retain their current missing-data behavior unless they explicitly opt in.

Validation

  • Regression test verifies per-pixel EVI and LSWI filling, preservation of leading missing values, and rejection of values older than the configured 12-day limit.
  • Focused test suite: 1 passed.

Provide an opt-in per-pixel forward-fill method for EVI, LSWI, or
caller-selected satellite indices after timestamp merging. Preserve
leading and over-age gaps as missing through an optional observation-age
limit, and add regression coverage for independent pixel histories and
bounded carry-forward behavior.   Runs much faster than LOWESS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant